package com.xrui.hbaseview.ui.controls.format;

import javax.swing.text.StyledEditorKit;
import javax.swing.text.ViewFactory;

/**
 * This class is used to customize style of the view.
 */
public class FormatEditorKit extends StyledEditorKit {

    //region Constants
    private static final long serialVersionUID = 2969169649596107757L;
    //endregion

    //region Variables
    private FormatViewFactory viewFactory;
    //endregion

    //region Constructor
    public FormatEditorKit(TextFormatter formatter) {
        this.viewFactory = new FormatViewFactory(formatter);
    }
    //endregion

    //region Public Methods
    @Override
    public ViewFactory getViewFactory() {
        return this.viewFactory;
    }

    @Override
    public String getContentType() {
        return "text/custom";
    }
    //endregion
}
